<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
	<meta charset="UTF-8">
	<title>考试详情</title>
	
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta name="description" content="Responsive Admin &amp; Dashboard Template based on Bootstrap 5">
	<meta name="author" content="AdminKit">
	<meta name="keywords" content="adminkit, bootstrap, bootstrap 5, admin, dashboard, template, responsive, css, sass, html, theme, front-end, ui kit, web">
	
	<link rel="preconnect" href="https://fonts.gstatic.com">
	<link rel="shortcut icon" href="img/icons/icon-48x48.png" />
	
	<link rel="canonical" href="https://demo-basic.adminkit.io/pages-profile.html" />

	<link href="css/app.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
	<!----<script src="js/app.js"></script>------>	
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<!----<script src="js/app.js"></script>------>
	
	<style type="text/css">
		div::-webkit-scrollbar {
			width: 6px;
			height: 6px;
  			background-color: rgba(240, 240, 240, 1);
  		}
		/*定义滚动条轨道 内阴影+圆角*/
		div::-webkit-scrollbar-track {
			box-shadow: inset 0 0 0px rgba(240, 240, 240, 0.0);
			border-radius: 10px;  
			background-color: rgba(240, 240, 240, 00.0);
		}
		/*定义滑块 内阴影+圆角*/
		div::-webkit-scrollbar-thumb {
			border-radius: 10px;  
			box-shadow: inset 0 0 0px rgb(255, 0, 0);
			background-color: rgb(0, 0, 0,0.3)
	</style>
	
	<!--  //0：未审核 1：未开始 2：考试中 3：结束未批改完成 4：结束并批改完成 5：签到中 6：审核未通过 -->
</head>

<body>
<script type="text/javascript">
$(document).ready(function(){
	$("#a1").click(function(){
		$("#b1").slideToggle("slow");
	});
	$("#a2").click(function(){
		$("#b2").slideToggle("slow");
	});
	$("#a3").click(function(){
		$("#b3").slideToggle("slow");
	});
});
</script>

<div class="wrapper">
		<nav id="sidebar" class="sidebar js-sidebar">
			<div class="sidebar-content js-simplebar">
				<a class="sidebar-brand" href="index.html">
	      <span class="align-middle">考试系统</span>
	    </a>
	
				<ul class="sidebar-nav">
					<li class="sidebar-header">
								导航栏
							</li>
					
					
							<li class="sidebar-item">
								<a class="sidebar-link" href="teacher.html" th:if="${usertype} eq '0'" >
					  <i class="align-middle" data-feather="user"></i> <span class="align-middle">个人主页</span>
					</a>
					<a class="sidebar-link" href="/personpage3" th:if="${usertype} eq '1'" >
					  <i class="align-middle" data-feather="user"></i> <span class="align-middle">个人主页</span>
					</a>
					<a class="sidebar-link" href="admin.html" th:if="${usertype} eq '2'" >
					  <i class="align-middle" data-feather="user"></i> <span class="align-middle">个人主页</span>
					</a>
							</li>
					
							<li class="sidebar-item">
								<a class="sidebar-link" href="/myexam">
					  <i class="align-middle" data-feather="check-square"></i> <span class="align-middle">考试主页</span>
					</a>
							</li>
					
							<li class="sidebar-item">
								<a class="sidebar-link" href="/class">
					  <i class="align-middle" data-feather="book"></i> <span class="align-middle">课程主页</span>
					</a>
							</li>
					
							<li class="sidebar-item">
								<a class="sidebar-link" href="/questionbankpage">
					  <i class="align-middle" data-feather="map"></i> <span class="align-middle">题库练习</span>
					</a>
							</li>
							<li class="sidebar-item" th:if="${usertype} eq '0'">
										<a class="sidebar-link" href="/AddExaminfo">
							  <i class="align-middle" data-feather="file"></i> <span class="align-middle">上传考试</span>
							</a>
									</li>
				</ul>
			</div>
		</nav>
	
		<div class="main">
			<nav class="navbar navbar-expand navbar-light navbar-bg">
				<a class="sidebar-toggle js-sidebar-toggle">
					<i class="hamburger align-self-center"></i>
				</a>
	
				<div class="navbar-collapse collapse">
					<ul class="navbar-nav navbar-align">
						<li class="nav-item dropdown">
							<a class="nav-icon dropdown-toggle d-inline-block d-sm-none" href="#" data-bs-toggle="dropdown">
								<i class="align-middle" data-feather="settings"></i>
							</a>
	
							<a class="nav-link dropdown-toggle d-none d-sm-inline-block" href="#" data-bs-toggle="dropdown">
								<i class="align-middle me-2" data-feather="feather"></i>
								<span th:if="${usertype} eq '0'">老师</span>
								<span th:if="${usertype} eq '1'">学生</span>
								<span th:if="${usertype} eq '2'">管理员</span>
								<img src="images/someicon/teacher.jpg" class="avatar img-fluid rounded me-1" alt="老师" th:if="${usertype} eq '0'"/> 
								<img src="images/someicon/student.jpg" class="avatar img-fluid rounded me-1" alt="学生" th:if="${usertype} eq '1'"/> 
								<img src="images/someicon/admin.jpg" class="avatar img-fluid rounded me-1" alt="管理员" th:if="${usertype} eq '2'"/> 
								<span class="text-dark" th:text="${usermail}"></span>
							</a>
							<div class="dropdown-menu dropdown-menu-end">
								<a class="dropdown-item" href="teacherinfoupdate" th:if="${usertype} eq '0'"><i class="align-middle me-1" data-feather="user"></i> 修改信息</a>
								<a class="dropdown-item" href="/newstudentInformation" th:if="${usertype} eq '1'"><i class="align-middle me-1" data-feather="user"></i>  修改信息</a>
								<a class="dropdown-item" href="admininfoupdate" th:if="${usertype} eq '2'"><i class="align-middle me-1" data-feather="user"></i>  修改信息</a>
								<div class="dropdown-divider"></div>
								<a class="dropdown-item" href="logout">Log out</a>
							</div>
						</li>
					</ul>
				</div>
			</nav>

		
			<!--主要内容栏--->			
			<main class="content">
				<div class="container-fluid p-0">		
					<div class="row">
						<div class="col-12 mb-3">
							<h1 class="h3 d-inline align-middle">考试详情展示</h1>
							<a class="badge bg-dark text-white ms-2" href="help.html">Get more tips</a>
						</div>
						
						<!-- 考试信息展示 -->
						<div class="col-12 mb-3">
							<div class="card">
								<div class="card-header mb-0">
									<div class="row">
										<!-- 考试静态信息模块 -->
										<!-- 111 -->
										<div class="card-title col-3 col-lg-2">考试编号：</div>
										<div class="card-title col-2 col-lg-1" th:text="${thisexaminfo.id}"></div>																		
										<div class="card-title col-2 col-lg-1">
											<span class="badge bg-primary" th:text="${thisexaminfo.subject}"></span>
										</div>
										<div class="card-title col-2 col-lg-1">
											<span th:if="${examState} eq '0'" class="badge bg-danger">未审核</span>
											<span th:if="${examState} eq '1'" class="badge bg-danger">未开始</span>
											<span th:if="${examState} eq '5'" class="badge bg-warning">签到中</span>	
											<span th:if="${examState} eq '2'" class="badge bg-warning">进行中</span>
											<span th:if="${examState} eq '3'" class="badge bg-success">已结束</span>
											<span th:if="${examState} eq '4'" class="badge bg-success">已批改</span>																
										</div>
										<div class="card-title col-3 col-lg-7"></div>
										<!-- 222 -->
										<div class="card-title col-3 col-lg-2">老师邮箱：</div>
										<div class="card-title col-3 col-lg-4 ml-0" th:text="${thisexaminfo.email}"></div>
										<div class="card-title col-3 col-lg-2">是否贡献为题库：</div>
										<div class="card-title col-3 col-lg-2 ml-0"  th:if="${thisexaminfo.type} eq '0'"><i class="align-middle me-2" data-feather="check"></i></div>
										<div class="card-title col-3 col-lg-2 ml-0"  th:if="${thisexaminfo.type} eq '1'"><i class="align-middle me-2" data-feather="x"></i></div>
										<!-- 333 -->							
										<div class="card-title col-12 row">
											<div class="col-3 col-lg-2">考试时间:</div>
											<div class="col-4 col-lg-2" th:text="${#dates.format(thisexaminfo.starttime, 'yyyy-MM-dd HH:mm')}"></div>
											<div class="col-1">~</div>
											<div class="col-4 col-lg-2" th:text="${#dates.format(thisexaminfo.endtime, 'yyyy-MM-dd HH:mm')}"></div>
										</div>
										<!-- 444 -->		
										<div class="card-title col-12 row">
											<div class="col-3 col-lg-2 mt-1">参与考试的班级名单：</div>
											<div class="col-9 col-lg-10 row">
												<form class="col-3 col-lg-2" th:each="i:${classofexam}" action="/checkclass" enctype='multipart/form-data' method='POST'>
													<button type="submit" class="btn btn-primary" th:text="${classnames[iStat.index]}"></button>
													<input type="hidden" name="classid" th:value="${i}">												
												</form>	
											</div>
										</div>
										<!-- 学生签到模块 -->
										<div th:if="${usertype} eq '1'" class="col-12 mx-auto mt-3">
											<div th:if="${examState} eq '5'" class="col-12 mx-auto row" >
												<img th:src="@{${Checkpic}}" style="margin-left: 350px; width:300px;height:300px;">
												<form class="col-3" style="margin-top:12rem"action="/WaitingExam" enctype='multipart/form-data' method='POST'>
													<button type="submit" class="btn btn-primary mt-12">点击签到考试</button>
													<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
												</form>
											</div>
											<div th:if="${examState} eq '2'" class="col-12 mx-auto row">
												<img th:src="@{${Checkpic}}" style="margin-left: 350px; width:300px;height:300px;">
												<form class="col-3" style="margin-top:12rem" action="/WaitingExam" enctype='multipart/form-data' method='POST'>
													<button type="submit" class="btn btn-primary mt-12">点击签到考试</button>
													<input type="hidden" name="examid" th:value="${thisexaminfo.id}">													
												</form>
											</div>
										</div>													
									
										<!-- 管理员审核模块 -->
										<div th:if="${examState} eq '0'" class="col-12 mx-auto mt-3"> 
											<div th:if="${usertype} eq '2'" class="col-12">
												<form action="/passexam" enctype='multipart/form-data' method='POST' id="myform" class="col-12 row">
													<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
													<p class="col-12">*您可以在此输入对于该考试的评语作为工作记录</p>
													<textarea rows="3" class="col-10" name="comment" th:text="${comment}"></textarea>														
													<div class="col-2">
														<select onchange="submitForm();" class="form-select" name="examState">
															<option selected="selected">审核提交</option>
															<option value=1>通过审核</option>
															<option value=6>驳回考试</option>
															<option value=105>检查学生</option>
															<option value=106>检查班级</option>
															<option value=107>检查难度</option>
														</select>
														<script type="text/javascript">
															function submitForm(){
											   					var form = document.getElementById("myform");
											    				form.submit();
															}
														</script>
													</div>
												</form>
											</div>
										</div>
									
									</div>
								</div>
								<hr class="my-0 mb-3" />
								<div style="overflow-y: scroll;height:25rem;" th:if="${usertype} ne '1'">
									<h3 style="margin-left:1rem;font-weight:bond;">题目信息表</h3>
									<form th:if="${examState} eq '3'" action="/seedidexams1" enctype='multipart/form-data' method='POST' style="float:right;margin-top:-1.75rem;margin-right:1rem">
										<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
										<button type="submit" class="btn btn-primary mt-9" value="查看学生试卷">查看学生试卷</button>
									</form>
									<form th:if="${examState} eq '4'" action="/seedidexams1" enctype='multipart/form-data' method='POST' style="float:right;margin-top:-1.75rem;margin-right:1rem">
										<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
										<button type="submit" class="btn btn-primary mt-9" value="查看学生试卷">查看学生试卷</button>
									</form>
									<table class="table table-hover my-0 mx-auto">										
										<thead>
											<tr>
												<th>序号</th>
							        			<th>题型</th>
							        			<th>难度</th>
												<th>分数</th>
							        			<th>题干</th>
							        			<th>操作</th>
											</tr>
    									</thead>
    									<tbody>
      										<tr th:each="i:${bqlist}">
        										<td th:text="${iStat.count}"></td>
        										<td>简答题</td>
        										<td th:text="${i.difficulty}"></td>
									    		<td th:text="${i.point}"></td>
									    		<td th:text="${i.content}"></td>
									    		<td th:if="${bqcorlist[iStat.index]} eq '1'">
									    			<form action="/seeqexam" th:if="${examState} eq '4'" enctype='multipart/form-data' method='POST'>
									    				<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
														<input type="hidden" name="qindex" th:value="${iStat.index}">
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=3>
														<input type="hidden" name="bqfinish" value=0>
													</form>	
													<form action="/seeqexam" th:if="${examState} eq '3'" enctype='multipart/form-data' method='POST'>
									    				<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
														<input type="hidden" name="qindex" th:value="${iStat.index}">
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=3>
														<input type="hidden" name="bqfinish" value=0>
													</form>	
									    		</td>
									    		<td th:if="${bqcorlist[iStat.index]} eq '0'">
									    			<form th:if="${usertype} eq '0'" action="/corqexam1" enctype='multipart/form-data' method='POST'>
														<button type="submit" class="btn btn-primary" value="去批改">点击批改</button>
														<input type="hidden" name="qindex" th:value="${iStat.index}">
													</form>	
													<span th:if="${usertype} ne '0'" class="badge bg-warning">暂未批改</span>												
									    		</td>
        									</tr>
        									<tr th:each="i:${cqlist}">
												<td th:text="${iStat.count}"></td>
							   	 				<td>选择题</td>
							   					<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form th:if="${(examState == 3 || examState==4)}" action="/seeqexam" enctype='multipart/form-data' method='POST'>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=0>
														<input type="hidden" name="bqfinish" value=1>														
													</form>
												</td>
											</tr>
											<tr th:each="i:${jqlist}">
												<td th:text="${iStat.count}"></td>
							    				<td>判断题</td>
							    				<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form th:if="${(examState == 3 || examState==4)}" action="/seeqexam" enctype='multipart/form-data' method='POST'>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=1>
														<input type="hidden" name="bqfinish" value=1>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
													</form>
												</td>
											</tr>
											<tr th:each="i:${fqlist}">
												<td th:text="${iStat.count}"></td>
							    				<td>填空题</td>
							    				<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form action="/seeqexam" th:if="${(examState == 3 || examState==4)}" enctype='multipart/form-data' method='POST'>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=2>
														<input type="hidden" name="bqfinish" value=2>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
													</form>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								
								
								<div style="overflow-y: scroll;height:20rem;" th:if="${usertype} eq '1'">
									<form th:if="${(examState == 3 || examState==4)}" action="/seewrongqs" enctype='multipart/form-data' method='POST' style="float:right">
										<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
										<button type="submit" class="btn btn-warning mt-3" value="打印错题">打印错题</button>
									</form>	
									<form th:if="${(examState == 3 || examState==4)}" action="/seedidexams1" enctype='multipart/form-data' method='POST' style="float:right">
										<input type="hidden" name="examid" th:value="${thisexaminfo.id}">
										<button type="submit" class="btn btn-primary mt-9" value="查看学生试卷">查看学生试卷</button>
									</form>									
									<table class="table table-hover my-0" th:if="${(examState == 3 || examState==4)}" >
										<thead>
											<tr>
												<th>序号</th>
							        			<th>题型</th>
							        			<th>难度</th>
												<th>分数</th>
							        			<th>题干</th>
							        			<th>操作</th>
											</tr>
    									</thead>
    									<tbody>
      										<tr th:each="i:${bqlist}">
        										<td th:text="${iStat.count}"></td>
        										<td>简答题</td>
        										<td th:text="${i.difficulty}"></td>
									    		<td th:text="${i.point}"></td>
									    		<td th:text="${i.content}"></td>
									    		<td th:if="${bqcorlist[iStat.index]} eq '1'">
									    			<form action="/seeqexam" enctype='multipart/form-data' method='POST'>
									    				<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
														<input type="hidden" name="qindex" th:value="${iStat.index}">
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=3>
														<input type="hidden" name="bqfinish" value=0>
													</form>	
									    		</td>
									    		<td th:if="${bqcorlist[iStat.index]} eq '0'">									    			
													<span th:if="${usertype} ne '0'" class="badge bg-warning">暂未批改</span>												
									    		</td>
        									</tr>
        									<tr th:each="i:${cqlist}">
												<td th:text="${iStat.count}"></td>
							   	 				<td>选择题</td>
							   					<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form action="/seeqexam" enctype='multipart/form-data' method='POST'>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=0>
														<input type="hidden" name="bqfinish" value=1>														
													</form>
												</td>
											</tr>
											<tr th:each="i:${jqlist}">
												<td th:text="${iStat.count}"></td>
							    				<td>判断题</td>
							    				<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form action="/seeqexam" enctype='multipart/form-data' method='POST'>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=1>
														<input type="hidden" name="bqfinish" value=1>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
													</form>
												</td>
											</tr>
											<tr th:each="i:${fqlist}">
												<td th:text="${iStat.count}"></td>
							    				<td>填空题</td>
							    				<td th:text="${i.difficulty}"></td>
							    				<td th:text="${i.point}"></td>
							    				<td th:text="${i.content}"></td>
												<td>
													<form action="/seeqexam" enctype='multipart/form-data' method='POST'>
														<input type="hidden" name="qid" th:value="${i.id}">
														<input type="hidden" name="qtype" value=2>
														<input type="hidden" name="bqfinish" value=1>
														<button type="submit" class="btn btn-primary" value="查看分数情况">查看分数</button>
													</form>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
  								
				
							</div>
						</div>		
				
					</div>
				</div>
			</main>
		</div>
</div>

<script src="js/app.js"></script>
</body>

</html>